package dk.viauc.cmclang.intlang;

import javax.swing.*;

public class TestDriverScanner 
{	//TODO
	private static final String EXAMPLES_DIR =  "C:\\Users\\Michal\\Documents\\7thSemester\\CMC\\workspace\\cmc";
		
		
		public static void main( String args[] )
		{
			JFileChooser fc = new JFileChooser( EXAMPLES_DIR );
			
			if( fc.showOpenDialog( null ) == fc.APPROVE_OPTION ) {
				SourceFile in = new SourceFile( fc.getSelectedFile().getAbsolutePath() );
				IScanner s = new Scanner( in );
			
				Token t = s.scan();
				while( t.kind != Token.EOT ) {
					System.out.println( t.kind + " " + t.spelling );
				
					t = s.scan();
				}
			}
		}
}
